EMT Practice Test

1. Question Content...


Question List

Question1: Which one of the following SAS procedures displays the data portion of a SAS data set?

Question2: The following SAS program is submitted:
data work.new;
length word $7;
amount = 4;
it amount = 4 then word = 'FOUR';
else if amount = 7
then word = 'SEVEN';
else word = 'NONE!!!';
amount = 7;
run;
What are the values of the AMOUNT and WORD variables in SAS dataset work.new?

Question3: Given the following raw data records in TEXTFILE.TXT:

The following output is desired:

Which SAS program correctly produces the desired output?

Question4: The following SAS program is submitted:
data WORK.DATE_INFO;
Day="01" ;
Yr=1960 ;
X=mdy(Day,01,Yr) ;
run;
What is the value of the variable X?

Question5: Consider the following data step:

In filtering the values of the variable X in data set WORK.OLD, what value new value would be assigned to X if its original value was a missing value?

Question6: The following SAS program is submitted:
data ONE TWO SASUSER.TWO
set SASUSER.ONE;
run;
Assuming that SASUSER.ONE exists, how many temporary and permanent SAS data sets are created?

Question7: The value 110700 is stored in a numeric variable named SALARY.
Which FORMAT statement displays the value as $110,700.00 in a report?

Question8: Given the SAS data set WORK.TEMPS:

The following program is submitted:

Which output is correct?

Question9: The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country = City!!', '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?

Question10: The contents of the raw data file PRODUCT are listed below:
--------10-------20-------30
24613 $25.31
The following SAS program is submitted:
data inventory;
infile 'product';
input idnum 5. @10 price;
run;
Which one of the following is the value of the PRICE variable?

Question11: The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department
run;
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments.
What is the result?

Question12: The following SAS program is submitted:
data WORK.OUTDS;
do until(Prod GT 6);
Prod + 1;
end;
run;
What is the value of the variable Prod in the output data set?

Question13: The following SAS program is submitted:
data work.test;
Author = 'Agatha Christie';
First = substr(scan(author,1,' ,'),1,1);
run;
Which one of the following is the length of the variable FIRST in the output data set?

Question14: Given the data set WORK.EMPDATA:

Which one of the following where statements would display observations with job titles containing the word
'Manager'?

Question15: The following SAS program is submitted:
data work.one;
x = 3;
y = 2;
z = x ** y;
run;
Which one of the following is the value of the variable Z in the output data set?

Question16: The following SAS program is submitted:
data stats;
set revenue;
array weekly{5} mon tue wed thu fri;
total = weekly{i} * .25;
output;
end;
run;
Which one of the following DO statements completes the program and processes the elements of the WEEKLY array?

Question17: Given the raw data record in the file phone.txt:

Which SAS statement completes the program and results in a value of "James Stevens" for the variableFullName?

Question18: Which statement correctly computes the average of four numerical values?

Question19: The following SAS program is submitted:
data work.retail;
cost = '20000';
total= .10* cost
run;
What is the result?

Question20: The data set WORK.REALESTATE has the variable LocalFee with a format of 9. and a variable CountryFee with a format of 7.; The following SAS program is submitted:

What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?

Question21: The SASDATA.BANKS data set has five observations when the following SAS program is submitted:
libname sasdata 'SAS-data-library';
data allobs;
set sasdata.banks;
capital=0;
do year = 2000 to 2020 by 5;
capital + ((capital+2000) * rate);
output;
end;
run;
How many observations will the ALLOBS data set contain?

Question22: Given the SAS data set PERM.STUDENTS:
PERM.STUDENTS NAME AGE
--------- ------- Alfred 14
Alice 13
Barbara 13
Carol 14
The following SAS program is submitted:
libname perm 'SAS data library';
data students;
set perm.students;
file 'file specification';
put name $ age;
<insert statement here>
run;
The following double-spaced file is desired as output
Alfred 14
Alice 13
Barbara 13
Carol 14
Which statement completes the program and creates the desired file?

Question23: The SAS data set named WORK.TEST is listed below:
capacity airplanetype staff
150 Large 10
Which one of the following SAS programs created this data set?

Question24: Given the AIRPLANES data set
AlRPLANES
TYPE MPG
-------- ------
F-18 105
C-130 25
Harrier 75
A-6 110
The following SAS program is submitted:
data gt100;
set airplanes(keep = type mpg load);
load = mpg * 150;
run;
The program fails to execute due to syntax errors.
What is the cause of the syntax error?

Question25: What describes the SAS automatic _ERROR_ variable?

Question26: The following SAS program is submitted:
libname company 'SAS-data-library';
proc sort data = company.payroll;
by EmployeeIDNumber;
run;
Write access has been granted to the COMPANY library.
Which one of the following represents how the observations are sorted?

Question27: Given the following data step:

After data step execution, what will data set WORK.GEO contain?

Question28: The following SAS program is submitted:
data work.test;
array items{3} _temporary_;
run;
What are the names of the variable(s) in the WORKTEST data set?

Question29: The following SAS program is submitted:
data test;
set chemists;
jobcode = 'Chem2'
then description = 'Senior Chemist';
else description = 'Unknown';
run;
The value for the variable JOBCODE is:
JOBCODE
-------------
chem2
What is the value of the variable DESCRIPTION?

Question30: The following SAS program is submitted:
libname sasdata 'SAS-data-library';
data test;
set sasdata.chemists (keep = job_code);
if job_code = 'chem3'
then description = 'Senior Chemist';
run;
The variable JOB_CODE is a character variable with a length of 6 bytes.
Which one of the following is the length of the variable DESCRIPTION in the output data set?

Question31: The following SAS program is submitted;
data combine;
country = 'Italy, Russia, ireland';
found = find(country, 'i');
run;
What is the value of the variable FOUND in the output data set?

Question32: The SAS data set Fed.Banks contains a variable Open_Date which has been assigned a permanent label of "Open Date". Which SAS program temporarily replaces the label "Open Date" with the label "Starting Date" in the output?

Question33: The following SAS program is submitted:
data numrecords;
infile 'file specification';
input@1 patient $15.
relative$ 16-26@;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step execution?

Question34: The SAS data set WORK.AWARDS is listed below:
fname points
Amy 2
Amy 1
Gerard 3
Wang 3
Wang 1
Wang 2
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
Which one of the following represents how the observations are sorted?

Question35: The following SAS program is submitted:
data WORK.ONE;
Text='Australia, US, Denmark';
Pos=find(Text,'US','i',5);
run;
What value will SAS assign to Pos?

Question36: The following SAS program is submitted:

What is produced as output?

Question37: The SAS data set WORK.ONE contains a numeric variable named Num ana character variable named Char:
WORK.ONE
Num Char
------ ------
1 23
3 23
1 77
The following SAS program is submitted:
proc print data=WORK.ONE;
where Num='1';
run;
What is output?

Question38: What is the purpose or the MISSOVER option on the INFILE statement?

Question39: The following SAS program is submitted:

How will the Exam variable value be displayed in the FREQ procedure output?

Question40: The following SAS program is submitted:
data work.test;
array agents{4} $ 12 sales1 - sales4;
run;
Which one of the following represents the variables that are contained in the output data set?

Question41: The following SAS program is submitted, creating the SAS data set ONE:
data one;
infile 'file specification';
input num chars$;
run;
ONE
NUM CHAR
------- ---------
1 23
3 23
1 77
The following SAS program is submitted:
proc print data = one;
where char = 23;
run;
What is output?

Question42: The following SAS program is submitted:
data combine;
prefix='505';
middle='6465 ';
end='09090';
<insert statement here>;
run;
Which statement successfully completes the program so that TOTAL has a value of 505-6465-
09090?

Question43: The following SAS program is submitted:
data _null_;
set old (keep = prod sales1 sales2);
file 'file-specification';
put sales1 sales2;
run;
Which one of the following default delimiters separates the fields in the raw data file created?

Question44: The following SAS program is submitted:
data work.test;
Title = 'A Tale of Two Cities, Charles J Dickens';
Word = scan(title,3,' ,');
run;
Which one of the following is the value of the variable WORD in the output data set?

Question45: The following SAS program is submitted:
libname temp 'SAS data library';
data temp.sales;
merge temp.sales
work.receipt;
by names;
run;
The input data files are sorted by the NAMES variable:
What is the result?

Question46: The following program is submitted:
proc contents data=_all_;
run;
Which statement best describes the output from the submitted program?

Question47: The following SAS program is submitted:
proc contents data = sashelp.class varnum; quit;
What does the VARNUM option print?

Question48: The following SAS program is submitted:
data WORK.ACCOUNTING;
set WORK.DEPARTMENT;
label Jobcode='Job Description';
run;
Which statement is true about the output dataset?

Question49: Consider the following data step:
data WORK.NEW;
set WORK.OLD;
Count+1;
run;
The varaible Count is created using a sum statement. Which statement regarding this variable is true?

Question50: Given the SAS data set PEPM.STUDENTS:
PERM.STUDENTS NAME AGE
--------- ------ Alfred 14
Alice13
Barbara13
Carol14
The following SAS program is submitted:
libname perm 'SAS data library';
data students;
set perm.students;
file 'file specification';
put name $15. @5 age 2.;
run;
What is written to the output raw data file?

Question51: Given the following code:
proc print data=SASHELP.CLASS(firstobs=5 obs=15);
where Sex='M';
run;
How many observations will be displayed?

Question52: The following SAS program is submitted:
data WORK.AUTHORS;
array Favorites{3} $ 8 ('Shakespeare','Hemingway','McCaffrey');
run;
What is the value of the second variable in the dataset WORK.AUTHORS?

Question53: The following SAS program is submitted:
proc format
value score 1 - 50 = 'Fail'
51 - 100 = 'Pass';
run;
proc report data = work.courses nowd;
column exam;
define exam / display format = score.;
run;
The variable EXAM has a value of 50.5.
How will the EXAM variable value be displayed in the REPORT procedure output?

Question54: The following SAS program is submitted:
data one;
date = '04juI2005'd;
format date weekdate.; run;
proc print data = one; run;
What output is generated?

Question55: Given the SAS data set ONE:
Given the SAS data set WORK.ONE:

The following SAS program is submitted:

Which report is produced?

Question56: The following program is submitted:

Why does the program fail?

Question57: Given the SAS data set WORK.EMP_NAME:

Given the SAS data set WORK.EMP_DEPT:

The following program is submitted:

How many observations are in data set WORK.ALL after submitting the program?

Question58: Read the table

The following SAS program is submitted:
proc freq data = sales;
<insert TABLES statement here>
run;
The following output is created by the FREQUENCY procedure:

Which TABLES statement(s) completed the program and produced the output?

Question59: The following SAS program is submitted:
<insert ODS statement here>
proc means data = sasuser.shoes;
where product in ('Sandal' , 'Slipper' , 'Boot');
run;
<insert ODS statement here>
Which ODS statements complete the program and send the report to an HTML file?

Question60: The following SAS DATA step is submitted:
data work.accounting;
set work.department;
length jobcode $ 12;
run;
The WORK.DEPARTMENT SAS data set contains a character variable named JOBCODE with a length of
5. Which one of the following is the length of the variable JOBCODE in the output data set?

Question61: The following SAS program is submitted:
data WORK.ACCOUNTING;
set WORK.DEPARTMENT;
length EmpId $6;
CharEmpid=EmpId;
run;
If data set WORK.DEPARTMENT has a numeric variable EmpId. Which statement is true about the output dataset?

Question62: The following SAS program is submitted:
<_insert_ods_code_>
proc means data=SASUSER.SHOES;
where Product in ('Sandal' , 'Slipper' , 'Boot');
run;
<_insert_ods_code_>
Which ODS statements inserted, respectively, in the two location above creates a report stored in an html file?

Question63: The following SAS program is submitted:

What new variables are created?

Question64: Given the contents of the raw data file TYPECOLOR.DAT:

The following SAS program is submitted:

What are the values of the variables Type and Color?

Question65: A user-defined format has been created using the FORMAT procedure. Where is it stored?

Question66: The Excel workbook REGIONS.XLS contains the following four worksheets:
EAST
WEST
NORTH
SOUTH
The following program is submitted:
libname MYXLS 'regions.xls';
Which PROC PRINT step correctly displays the NORTH worksheet?

Question67: The Excel workbook QTR1.XLS contains the following three worksheets:
JAN
FEB
MAR
Which statement correctly assigns a library reference to the Excel workbook?

Question68: Given the SAS data set ONE:
ONE
Obs Dte
----- --------
1 09JAN2005
2 12JAN2005
The following SAS program is submitted:
data two;
set one;
day = <insert expression here>;
format dte date9.;
run;
The data set TWO is created:
TWO
Obs Dte Day
1 09JAN2005 1
12 JAN2005 4
Which expression successfully completed the program and created the variable DAY?

Question69: Given the following raw data records in DATAFILE.TXT:

Which output is correct based on the submitted program?

Question70: The data set RALESTATE has the variable LOCALFEE with a format or 9. and a variable COUNTRYFEE with a format or 7.; The following SAS program is submitted:
data history;
format local fee country fee percent6.;
set realestate;
local fee = local fee / 100;
country fee = country fee / 100;
run;
What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?

Question71: Given the following raw data records:

The following output is desired:

Which SAS program correctly reads in the raw data?

Question72: Which statement describes a characteristic of the SAS automatic variable _ERROR_?

Question73: The following output is created by the FREQUENCY procedure:

Which TABLES statement was used to completed the following program that produced the output?
proc freq data=sales;
<_insert_code_>
run;

Question74: The following program is submitted:
proc sort data=SASUSER.PROJECTS out=PSORT;
by Code descending Date Cost;
run;
Which of the following is true concerning the submitted program?

Question75: The following SAS program is submitted:
data work.test;
Author = 'Christie, Agatha';
First = substr(scan(author,2,' ,'),1,1);
run;
Which one of the following is the value of the variable FIRST in the output data set?

Question76: Which step sorts the observations of a permanent SAS data set by two variables and stores the sorted observations in a temporary SAS data set?

Question77: The following SAS program is submitted:
Data_null_;
set old;
put sales 1 sales2;
run;
Where is the output written?

Question78: The following SAS program is submitted:
proc contents data = sasuser.airplanes;
run;
Which one of the following is produced as output?

Question79: Given the following raw data record:
07Jan2005
Which INFORMAT reads this raw data and stores it as a SAS date value?

Question80: Which of the following programs correctly invokes the DATA Step Debugger?

Question81: Given the SAS data set WORKAWARDS:
WORK.AWARDS
FNAME POINTS MONTH
----------- ------------ -----------
Amy 2 4
Amy 1 7
Gerard 3 3
Wang 3 3
Wang 1 12
Wang 1 8
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
How are the observations sorted?

Question82: Given the raw data file AMOUNT:
----I---- 10---I----20---I----30
$1,234
The following SAS program is submitted:
data test;
infile 'amount';
input@1 salary 6.;
if_error_then description = 'Problems';
else description = 'No Problems';
run;
What is the result?

Question83: The following SAS program is submitted:
data work.flights;
destination = 'cph';
select(destination);
when('LHR') city = 'London';
when('CPH') city = 'Copenhagen';
otherwise city = 'Other';
end;
run;
What is the value of the CITY variable?

Question84: Given the SAS data set WORK.PRODUCTS:

How many observations does the WORK.OUTDOOR data set contain?

Question85: Given the SAS data set EMPLOYEE INFO:
EMPLOYEE_INFO
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;
<insert BY statement here>
run;
Which BY statement completes the program and sorts the data sequentially by ascending expense values within each ascending IDNUMBER value?

Question86: Which step displays a listing of all the data sets in the WORK library?

Question87: The SAS data set EMPLOYEE_INFO is listed below:
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;
run;
Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within each descending IDNUMBER value?

Question88: Which of the following choices is an unacceptable ODS destination for producing output that can be viewed in Microsoft Excel?

Question89: The following SAS program is submitted:
data work.test;
set work.staff (keep = jansales febsales marsales);
array diff_sales{3} difsales1 - difsales3;
array monthly{3} jansales febsales marsales;
run;
What new variables are created?

Question90: The following SAS program is submitted:

The SAS data set WORK.SALARY is currently ordered by Gender within Department. Which inserted code will accumulate subtotals for each Gender within Department?

Question91: The following SAS program is submitted:
data temp.x;
set sasuser.y;
run;
What must be submitted prior to this SAS program for the program to execute successfully?

Question92: Which statement is true concerning the SAS automatic variable _ERROR_?

Question93: On which portion(s) of a SAS data set does the PRINT procedure report?

Question94: The following SAS program is submitted:
libname temp 'SAS data library';
data work.new;
set temp.jobs;
format newdate mmddw10.;
mdate = month(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new; run;
The variable NEWDATE contains the SAS date value for April 15. 2005. What output is produced if April
15, 2005 falls on a Friday?

Question95: The following SAS program is submitted:

What is the initial value of the variable Total in the following program?

Question96: The following SAS program is submitted:
data test;
infile 'file specification';
input name $ amount@@;
run;
Which of the following is true?

Question97: Which is a valid LIBNAME statement?

Question98: Given the raw data file YEARAMT:
----|---10---|---20---|----30
1901 2
1905 1
1910 6
1925 .
1941 1
The following SAS program is submitted:
data coins;
infile 'yearamt';
input year quantity;
<insert statement(s) here>
run;
Which statement(s) completed the program and produced a non-missing value for the variable TOTQUANTITY in the final observation of the output data set?

Question99: A raw data file is listed below:
--------10-------20-------30
squash 1.10
apples 2.25
juice 1.69
The following SAS program is submitted using the raw data file above:
data groceries;
infile 'file-specification';
input item $ cost;
run;
Which one of the following completes the program and produces a grand total for all COST values?

Question100: The following SAS program is submitted:

What types of variables are DayOfMonth, MonthOfYear, and Year?

Question101: The observations in the SAS data set WORK.TEST are ordered by the values of the variable SALARY.
The following SAS program is submitted:
proc sort data = work.test out = work.testsorted;
by name;
run;
Which one of the following is the result of the SAS program?

Question102: The following SAS program is submitted:

What will the data set WORK.TEST contain?

Question103: Given the raw data file EMPLOYEE:
----I----1 0---I----20---I----30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile 'employee';
input employee_name $ 1-4;
if employee_name = 'Ruth' then input idnum 10-11;
else input age 7-8;
run;
What value does the variable IDNUM contain when the name of the employee is "Ruth"?

Question104: Read the table:

Given the SAS data set SASUSER.HOUSES:
Obs style bedrooms baths price sqteet street
1 CONDO 2 1.5 80050 1200 MAIN
2 CONDO 3 2.5 79350 1300 ELM
3 CONDO 4 2.5 127150 1400 OAK
4 CONDO 2 2.0 110700 1100 FIFTH
5 TWOSTORY 4 3.0 107250 2100 SECOND
6 TWOSTORY 2 1.0 55650 1600 WEST
7 TWOSTORY 2 1.0 69250 1450 NORTH
6 TWOSTORY 4 2.5 102950 2000 SOUTH
The following SAS program is submitted:
proc report data = sasuser.houses nowd headline;
column style price;
where price It 100000;
<insert DEFINE statement here>
define price / mean width = 9 format = dollar12.;
title;
run;
The following output is desired:
style price
------- ------
CONDO $79,700
TWOSTORY $62550
Which DEFINE statement completes the program and produces the desired output?

Question105: A raw data file is listed below:
--------10-------20-------30
John McCloskey 35 71
June Rosesette 10 43
Tineke Jones 9 37
The following SAS program is submitted using the raw data file as input:
data work.homework;
infile 'file-specification';
input name $ age height;
if age LE 10;
run;
How many observations will the WORK.HOMEWORK data set contain?

Question106: The contents of the raw data file TEAM are listed below:
--------10-------20-------30
Janice 10
Henri 11
Michael 11
Susan 12
The following SAS program is submitted:
data group;
infile 'team';
input name $15. age 2.;
file 'file-specification';
put name $15. +5 age 2.;
run;
Which one of the following describes the output created?

Question107: Given the SAS data set WORK.PRODUCTS:

How many variables does the WORK.REVENUE data set contain?

Question108: You're attempting to read a raw data file and you see the following messages displayed in the SAS Log:

What does it mean?

Question109: The following code was modified to generate the results further below:
proc format;
value agegrp
low-12 ='Pre-Teen'
13-high = 'Teen';
run;
proc means data=SASHELP.CLASS;
var Height;
class Sex Age;
format Age agegrp.;
run;
The following results were generated to display only specific statistics and limit the decimals with the modification: Which statement below was modified or added to generate the results above:

Question110: Which one of the following statements is true regarding the name of a SAS array?

Question111: Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?

Question112: Given the contents of the raw data file EMPLOYEE:
----|----10----|----20----|----30
Alan 19/2/2004 ACCT
Rob 22/5/2004 MKTG
MaryJane 14/3/2004 EDUC
The following SAS program is submitted:
data emps;
infile 'employee';
input@1 name$
@ 15 date <insert INFORMAT here>
@ 25 department$;
run;
Which INFORMAT correctly completes the program?

Question113: The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department;
run;
The SAS data set named WORKSALARY contains 10 observations for each department, and is currently ordered by DEPARTMENT.
Which statement is true?

Question114: Given the SAS data set EMPLOYEES:
EMPLOYEES
NAME SALARY
-------- ------------
Innis 60000
Jolli 50000
Ellis 55000
Liu 45000
The following SAS program is submitted:
proc print data = employees; where name like '_i%';
run;
What is contained in the output?

Question115: Which one of the following SAS statements renames two variables?

Question116: Consider the data step:

Which of the following assignment statements for variable group are functionally equivalent to the original statement used in the above data step?

Question117: Which one of the following is true of the RETAIN statement in a SAS DATA step program?

Question118: Given the SAS data set QTR 1_REVENUE:
destination revenue
YYZ 53634
FRA 62129
FRA 75962
RDU 76254
YYZ 82174
The following SAS program is submitted:
proc sort data = qtr1_revenue;
by destination descending revenue; run;
What is the first observation in the output data set?

Question119: The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered by Department. The following SAS program is submitted:

Which statement is true?

Question120: The following SAS program is submitted:
data work.company;
set work.dept1(keep = jobcode)
work.dept2(rename = (jcode = jobcode));
run;
Which one of the following is the result?

Question121: The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City_Country = substr(First,1,7)!!', '!!'England';
run;
Which one of the following is the length of the variable CITY_COUNTRY in the output data set?

Question122: The following SAS program is submitted:
data work.staff;
JobCategory = 'FA';
JobLevel = '1';
JobCategory = JobCategory || JobLevel;
run;
Which one of the following is the value of the variable JOBCATEGORY in the output data set?

Question123: The following SAS program is submitted:
data test;
set sasuser.employees;
if 2 le years_service le 10 then
amount = 1000;
else amount = 0;
amount_per_year = years_service / amount
run;
What is the value of the variable AMOUNT_PER_YEAR if an employee has been with the company for one year?

Question124: Given the SAS data set WORK.ONE:

And the SAS data set WORK.TWO:

The following program is submitted:

What is the first observation in the SAS data set WORK.BOTH?

Question125: Given the contents of the raw data file TYPECOLOR:
----I----10---I----20---I----30
Daisyyellow
The following SAS program is submitted:
data flowers;
infile 'typecolor';
input type$ 1-5+1 color$;
run;
What are the values of the variables TYPE and COLOR?

Question126: The following SAS program is submitted:
data allobs;
set sasdata.origin (firstobs = 75 obs = 499);
run;
The SAS data set SASDATA.ORIGIN contains 1000 observations.
How many observations does the ALLOBS data set contain?

Question127: After a SAS program is submitted, the following is written to the SAS log:
105 data january;
106 set allmonths(keep = product month num_sold cost);
107 if month = 'Jan' then output january;
108 sales = cost * num_sold;
109 keep = product sales;
------
22
ERROR 22-322: Syntax error, expecting one of the following:!,
!!, &, *,**, +, -,/, <,< =, <>, =, >, ><, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR,^=,|,II,
110 run;
What changes should be made to the KEEP statement to correct the errors in the LOG?

Question128: The contents of the SAS data set PERM.JAN_SALES are listed below:
VARIABLE NAME TYPE
idnum character variable
sales_date numeric date value
A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in a MMDDYY10 form.
Which one of the following SAS DATA steps correctly creates this raw data file?

Question129: The following SAS program is submitted:
data WORK.DATE_INFO;
X="01Jan1960" D;
run;
What variable X contains what value?

Question130: The following output is created by the FREQUENCY procedure:

Which TABLES option(s) would be used to eliminate the row and column counts and just see the frequencies and percents?

Question131: The following SAS program is submitted:
proc freq data = class;
tables gender * age / <insert option here>;
run;
The following report is created:
The FREQ Procedure
Table of gender by age
Row Column
Gender age Frequency Percent Percent Percent
F 11 1 10.00 20.00 50.00
12 2 20.00 40.00 40.00
13 2 20.00 40.00 66.67
Total 5 50.00 100.00
M 11 1 10.00 20.00 50.00
12 3 30.00 60.00 60,00
13 1 10.00 20.00 33.33
Total 5 50.00 100.00
Total 11 2 20.00 100.00
12 5 50.00 100.00
13 3 30.00 100.00
Total 10 100.00
Which option correctly completes the program and creates the report?